采集搜索[搜].js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. globalThis.getHeaders= function(input){
  2. let headers = {
  3. 'User-Agent': 'okhttp/4.1.0'
  4. };
  5. return headers
  6. }
  7. var rule = {
  8. title:'点播',
  9. host:'http://tv.jsp47.com',
  10. homeUrl:'',
  11. searchUrl:'https://www.ugigc.us.kg/cj.php?q=**&pageNum=fypage',
  12. searchable:2,
  13. quickSearch:1,
  14. multi:1,
  15. filterable:1,
  16. headers:{
  17. 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36'
  18. },
  19. timeout:5000,
  20. limit:20,
  21. play_parse:true,
  22. lazy:"",
  23. 推荐:"",
  24. 一级:"",
  25. 二级:`js:
  26. let d = [];
  27. try {
  28. let html = request(input, {
  29. headers: getHeaders(url)
  30. });
  31. let json = JSON.parse(html);
  32. VOD = {
  33. vod_name: "",
  34. type_name: "",
  35. vod_actor: "",
  36. vod_year: "",
  37. vod_content: "",
  38. vod_remarks: "",
  39. vod_pic: ""
  40. };
  41. let playData = json.data;
  42. let playMap = {};
  43. playData.forEach(function(it, index) {
  44. VOD.vod_name =it.name;
  45. VOD.type_name = it.class ? it.class+"     线路:"+json.portname : "未知     线路:"+json.portname;
  46. VOD.vod_actor = it.actor;
  47. VOD.vod_content = it.content ? it.content : "特别提醒:ㅤ友情提示您请勿相信影片中的广告,以免上当受骗";
  48. VOD.vod_year = it.year;
  49. VOD.vod_pic = it.pic ? it.pic : "http://114.100.48.52:18008/movjpg/" + it.name + ".jpg";
  50. //let names = it.name +" ("+ (index+1) +")";
  51. let names = it.name;
  52. let playEsp = it.source.eps;
  53. playEsp.forEach(function(it) {
  54. let source = names;
  55. if (!playMap.hasOwnProperty(source)) {
  56. playMap[source] = []
  57. }
  58. playMap[source].append(it['name'].strip() + '$' + it['url']);
  59. })
  60. })
  61. let playFrom = [];
  62. let playList = [];
  63. Object.keys(playMap).forEach(function(key) {
  64. playFrom.append(key);
  65. playList.append(playMap[key].join('#'))
  66. });
  67. let vod_play_from = playFrom.join('$$$');
  68. let vod_play_url = playList.join('$$$');
  69. VOD['vod_play_from'] = vod_play_from;
  70. VOD['vod_play_url'] = vod_play_url
  71. } catch (e) {
  72. log('获取二级详情页发生错误:' + e.message)
  73. }`,
  74. 搜索:`js:
  75. let d = [];
  76. let html = request(input);
  77. let json = JSON.parse(html);
  78. json.data.forEach(function(data) {
  79. data.list.forEach(function(it) {
  80. d.push({
  81. url: "https://www.ugigc.us.kg/cj.php?id=" + it.id + "&port=" + data.port,
  82. title: it.name + "【" + data.portname + "】",
  83. img: it.pic,
  84. content:it.content,
  85. desc: it.remarks + "," + it.type_name
  86. })
  87. });
  88. });
  89. setResult(d);
  90. `
  91. }